Skip to content

Comments

[hue] Add new API support infrastructure#19309

Merged
jlaur merged 7 commits intoopenhab:mainfrom
andrewfg:hue-new-apis
Sep 10, 2025
Merged

[hue] Add new API support infrastructure#19309
jlaur merged 7 commits intoopenhab:mainfrom
andrewfg:hue-new-apis

Conversation

@andrewfg
Copy link
Contributor

@andrewfg andrewfg commented Sep 9, 2025

As intimated in #19303 Philips / Signify is floating additional functionality. To be specific the following features are in the pipeline:

  • Light bulbs will gain the ability to detect motion via Zigbee RF field fluctuations.
  • There will be a new door bell button device.
  • There will be a new speaker device (used for both security alarm and door bell).
  • Plus, a device software update notification resource has been available for a while, but not yet added to OH.

This PR is PHASE 1 which just adds the necessary infrastructure to support the above devices in future. It does the following:

  • Extends the ResourceType Enum to include the full list of known resource types.
  • Adds three new DTOs and three respective new Enums to support the newly added resource types.
  • Extends the master Resource DTO to support these new DTOs and Enums .

NOTE: this PR provides infrastructure only. The actual new channel-types will be added to the respective thing-types in a second phase once the actual new hardware goes on sale.

Signed-off-by: Andrew Fiddian-Green software@whitebear.ch

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@andrewfg andrewfg self-assigned this Sep 9, 2025
@andrewfg andrewfg requested review from Copilot and jlaur September 9, 2025 18:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds infrastructure support for new Philips Hue API features including motion detection, doorbell buttons, and speaker devices. The changes prepare the codebase for upcoming hardware releases by extending the resource type system and adding supporting DTOs.

  • Extends the ResourceType enum with new resource types for upcoming devices
  • Adds three new DTOs (Sound, SoundStatus, Mute) and three corresponding enums (SoundType, MuteType, SoftwareUpdateStatusType)
  • Modifies the master Resource DTO to support new sound-related functionality and software update status tracking

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ResourceType.java Adds new resource types for bell buttons, speakers, software updates, and other upcoming device categories
SoundType.java Defines enum for various sound types used by doorbell and speaker devices
SoftwareUpdateStatusType.java Defines enum for device software update status states
MuteType.java Defines enum for sound mute/unmute states
SoundStatus.java DTO for sound status information including current sound and available sound values
Sound.java DTO for sound configuration with status and available sound values
Mute.java DTO for mute state management
Resource.java Extends master resource DTO to support new sound features and software update status with proper JSON element disambiguation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Besides the failing tests and two minor comments, LGTM.

@jlaur
Copy link
Contributor

jlaur commented Sep 9, 2025

The test failures are unrelated to your PR.

andrewfg and others added 3 commits September 9, 2025 22:06
…ing/hue/internal/api/dto/clip2/Sound.java

Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
…ing/hue/internal/api/dto/clip2/SoundStatus.java

Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@andrewfg
Copy link
Contributor Author

andrewfg commented Sep 9, 2025

The test failures are unrelated to your PR.

Do I need run maven with -DwithResolver ??

@jlaur
Copy link
Contributor

jlaur commented Sep 9, 2025

Do I need run maven with -DwithResolver ??

I think it should be already handled by #19311.

Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jlaur jlaur merged commit 2808642 into openhab:main Sep 10, 2025
2 of 3 checks passed
@jlaur jlaur added this to the 5.1 milestone Sep 10, 2025
DrRSatzteil pushed a commit to DrRSatzteil/openhab-addons that referenced this pull request Oct 11, 2025
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
@andrewfg andrewfg deleted the hue-new-apis branch December 14, 2025 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants